//
//  AboutUsViewController.swift
//  BellManage
//
//  Created by Bestsch on 16/4/1.
//  Copyright © 2016年 wsl. All rights reserved.
//

import UIKit

class AboutUsViewController: BaseViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        // Do any additional setup after loading the view.
        
        self.title = "关于我们"
        
        InitViews()
    }
    
    func InitViews() {
        let infoDictionary: NSDictionary = Bundle.main.infoDictionary! as NSDictionary
        let icon = UIImageView.init(frame: CGRect(x: (screenW-66)/2, y: 200, width: 66, height: 81))
        icon.contentMode = UIViewContentMode.scaleAspectFit
        icon.image = logo
        self.view.addSubview(icon)
        
        let version = UILabel.init(frame: CGRect(x: 0, y: icon.frame.maxY + 20, width: screenW, height: 40))
        version.font = UIFont.systemFont(ofSize: 18)
        version.textColor = textlight
        version.textAlignment = NSTextAlignment.center
        let ver = infoDictionary.object(forKey: "CFBundleShortVersionString") as! String
        version.text = "V " + ver
        self.view.addSubview(version)
        
        let footTitle = UILabel.init(frame: CGRect(x: 0, y: screenH - 60, width: screenW, height: 20))
        footTitle.font = UIFont.systemFont(ofSize: 14)
        footTitle.textColor = textlight
        footTitle.textAlignment = NSTextAlignment.center
//        footTitle.text = "\(appname)市教育局"
        self.view.addSubview(footTitle)
        
        #if EDUMANAGE
            footTitle.text = "上海弘育信息有限公司 版权所有"
            let footContent = UILabel.init(frame: CGRect(x: 0, y: footTitle.frame.maxY, width: screenW, height: 30))
            footContent.font = UIFont.systemFont(ofSize: 14)
            footContent.textColor = textlight
            footContent.textAlignment = NSTextAlignment.center
            footContent.text = "Copyright 2011-2016 HongYu. All Rights Reserved"
            self.view.addSubview(footContent)
        #elseif HSEDUMANAGE
            footTitle.text = "无锡市惠山区教育局 版权所有"
        #elseif TXEDUMANAGE
            footTitle.text = "桐乡市教育局"
        #endif
        
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    
    /*
     // MARK: - Navigation
     
     // In a storyboard-based application, you will often want to do a little preparation before navigation
     override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
     // Get the new view controller using segue.destinationViewController.
     // Pass the selected object to the new view controller.
     }
     */
    
}
